<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <title>Mange Chez Moi - {% block title %}{% endblock %}</title>
        {% block stylesheets %}{% endblock %}
        <link rel="stylesheet" href="{{ asset('css/bootstrap.css') }}" type="text/css" />
        <link rel="stylesheet" href="{{ asset('css/bootstrap-responsive.css') }}" type="text/css" />
        <link rel="stylesheet" href="{{ asset('css/smoothness/jquery-ui-1.10.0.custom.css') }}" type="text/css" />
        <script type="text/javascript" src="{{ asset('js/jquery.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/bootstrap.js') }}"></script>         
        <script type="text/javascript" src="{{ asset('js/jquery-ui-1.10.0.custom.js') }}"></script> 
        <script type="text/javascript" src="{{ asset('js/jquery-ui-timepicker-addon.js') }}"></script>
        <script type="text/javascript" src="{{ asset('js/notation.js') }}"></script> 
        <link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
        <style type="text/css">
                body {
                    padding-top: 60px;
                    padding-bottom: 40px;
                }
                /* Customize the navbar links to be fill the entire space of the .navbar */
                .navbar .navbar-inner {
                    padding: 0;
                }
                .navbar .nav {
                    margin: 0;
                    display: table;
                    width: 100%;
                }
                .navbar .nav li {
                    display: table-cell;
                    width: 1%;
                    float: none;
                }
                .navbar .nav li a {
                    font-weight: bold;
                    text-align: center;
                    border-left: 1px solid rgba(255,255,255,.75);
                    border-right: 1px solid rgba(0,0,0,.1);
                }
                .navbar .nav li:first-child a {
                    border-left: 0;
                    border-radius: 3px 0 0 3px;
                }
                .navbar .nav li:last-child a {
                    border-right: 0;
                    border-radius: 0 3px 3px 0;
                }

            </style>
            <script type="text/javascript">
                jQuery(function($) {
                    // initialise the "Select date" link
                    $.datepicker.setDefaults($.datepicker.regional[ "fr" ]);
                    $.timepicker.setDefaults($.timepicker.regional[ "fr" ]);
                    // associate the link with a date picker
                    $('.date').each(function(){
                        var self = $(this);
                        self.datetimepicker({
                            dateFormat:         'dd/mm/yy',
                            timeFormat: 'hh:mm',
                            changeMonth:        true,
                            changeYear:         true,
                            showButtonPanel:    true,
                            firstDay:           1,
                            showOn:             "focus"
                        });
                    });
                });
                </script>
            </head>
            <body>
                <div class="navbar navbar-inverse navbar-fixed-top">
                    <div class="navbar-inner">
                        <div class="container">
                            <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                                <span class="icon-bar"></span>
                            </a>
                            <a class="brand" href="{{path('mcm_repas_homepage')}}">Mange Chez Moi</a>
                            <p class="navbar-text pull-left">
                                {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
                                    {{ 'layout.logged_in_as'|trans({'%username%': app.user.username}, 'FOSUserBundle') }} |
                                    <a href="{{ path('fos_user_security_logout') }}">
                                        {{ 'layout.logout'|trans({}, 'FOSUserBundle') }}
                                        </a>
                                {% else %}
                                        <a href="{{ path('fos_user_security_login') }}">{{ 'layout.login'|trans({}, 'FOSUserBundle') }}</a> | 
                                        <a href="{{ path('fos_user_registration_register') }}">{{ 'layout.register'|trans({}, 'FOSUserBundle') }}</a>
                                {% endif %}
                                    </p>
                                    <div class="nav-collapse collapse pull-right">
                                        <form action="{{path('mcm_repas_rechercher')}}" class="navbar-search form-search" method="post">
                                            <div class="input-append">
                                                <input type="text" name="form[mot]" id="form_mot" required="required" class="search-query span2" placeholder="Rechercher">
                                                <button type="submit" class="btn"><i class="icon-search"></i></button>
                                            </div>
                                        </form>
                                        <p class="navbar-text pull-right">
                                            &nbsp;<a href=""> <img src="{{ asset('img/facebook.png') }}"/></a>
                                            <a href=""><img src="{{ asset('img/twitter.png') }}"/></a>
                                        </p>
                                    </div><!--/.nav-collapse -->

                                </div>
                            </div>

                        </div>

                        <div class="container">
                        {% if is_granted("IS_AUTHENTICATED_REMEMBERED") %}
                                <div class="navbar">
                                    <div class="navbar-inner">
                                        <ul class="nav">
                                            <li><a class="brand" href="{{path('mcm_repas_homepage')}}"><img src="{{asset('img/mini_real_logomcm.png')}}" />Accueil</a></li>
                                            <li><a href="{{path('fos_user_profile_show')}}">Mon profil</a></li>
                                            <li><a href="{{path('repas')}}">Parcourir les repas</a></li>
                                            <li><a href="#about">A propos</a></li>
                                            <li><a href="#contact">Contactez nous</a></li>
                                        </ul>
                                    </div>
                                </div>
                            {% endif %}


                                    <h1>{% block titre %}{% endblock %}</h1>
                        {% block body %}{% endblock %}
                        {% block javascripts %}{% endblock %}
                                </div>
                                <hr>

                                <footer>
                                    <p>&copy; Mange Chez Moi 2013 - R&eacute;alis&eacute; par A. Tristrant, F. Gaudin, G. Francillette et R. Cerf</p>
                                </footer>
                            </div> 
                        </body>
                    </html>
